﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XSTDZ.ERP.Domain.Models
{
    /// <summary>
    /// 商品
    /// </summary>
    public partial class ProductInfo
    {
        public ProductInfo()
        {
            this.ProductInBillDetail = new HashSet<ProductInBillDetail>();
            this.ProductAllotDetail = new HashSet<ProductAllotDetail>();
            this.Stock = new HashSet<Stock>();

            this.ProductProcedure = new HashSet<ProductProcedure>();
        }
        public ProductInfo Init()
        {
            this.Deleted = 0;
            return this;
        }
        /// <summary>
        /// 设置删除状态（若为删除，则置为正常，否则为删除）
        /// </summary>
        /// <returns></returns>
        public ProductInfo SetDeleteState()
        {
            this.Deleted = this.Deleted == 0 ? 1 : 0;
            return this;
        }
    }
}
